package org.geoscrape;


/**
 * Objects that want notification of found caches should implement this interface
 * and register with the Searcher object.
 *
 */
public interface SearchCallback
{
	/**
	 * This is called every time a cache is found.
	 * 
	 * This method should not block, wait or perform time-consuming computations.
	 * This method should return as fast as possible.
	 * 
	 * @param cache
	 */
	public void found(Cache cache);
	
	/**
	 * This is called when a search is initiated.  
	 * 
	 * This method should not block, wait or perform time-consuming computations.
	 * This method should return as fast as possible.
	 * 
	 * @param n the number of caches to be returned by this search.
	 */
	public void totalNumber(int n);
}
